from langchain_openai import ChatOpenAI

from com.wp.langchain.exercise import config


class LLMInit:
    def __init__(self, model_name="qwen-max", api_key=config.API_KEY, base_url=config.BASE_URL, temperature=0.75):
        self.llm = ChatOpenAI(temperature=temperature,
                              model_name=model_name,
                              api_key=api_key,
                              base_url=base_url)

    def get_llm(self):
        return self.llm
